﻿CREATE TABLE [org].[Department] (
    [DepartmentId]                      INT             NOT NULL,
    [DepartmentCode]                    CHAR (5)        NOT NULL,
    [DepartmentName]                    VARCHAR (50)    NOT NULL,
    [DepartmentDescription]             NVARCHAR (1000) NULL,
    [DepartmentFlashPnlMinThresholdGBP] DECIMAL (18, 2) NULL,
    [DepartmentFlashPnLMaxThresholdGBP] DECIMAL (18, 2) NULL,
    [DepartmentFlashManualUpload]       BIT             NOT NULL,
    [DepartmentFlashMurexUpload]        BIT             NOT NULL,
    [DepartmentStartDate]               DATE            NOT NULL,
    [DepartmentEndDate]                 DATE            NULL,
    [IsLatest]                          BIT             NOT NULL,
    [IsActive]                          BIT             NOT NULL,
    [IsInternal]                        BIT             NOT NULL,
    PRIMARY KEY CLUSTERED ([DepartmentId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

